package com.rybbaby.tss.front.tssMemberAttendClassRecord.service;


import com.rybbaby.tss.core.bean.PageBean;
import com.rybbaby.tss.core.web.service.IBaseService;
import com.rybbaby.tss.front.tssMemberAttendClassRecord.entity.TssMemberAttendClassRecord;

import java.util.List;
import java.util.Map;

/**
 * @author 雷春琼
 * @description 会员报班记录表数据库操作服务接口
 * @createDate 2017-08-24 下午2:43:28
 */
public interface ITssMemberAttendClassRecordService extends IBaseService<TssMemberAttendClassRecord> {

    /**
     * 根据会员课时包和班级id查询已报班信息
     *
     * @param memberPackageId
     * @param classId
     * @return
     */
    List<Map<String, Object>> classDateList(String memberPackageId, String classId);

    /**
     * 根据会员课时包id分组查询会员报班记录
     *
     * @param memberPackageId
     * @return
     */
    PageBean tssMemberAttendClassRecordListGroupByClass(String memberPackageId, Integer pageNo, Integer pageSize);

    /**
     * 根据学生id会员,课时包id,班级id查询学生的报班情况
     *
     * @param memberId
     * @param memberPackageId
     * @param classId
     * @return
     */
    List<Map<String, Object>> getMemberAttendClassDetailList(String memberId, String memberPackageId, String classId);


    /**
     * 通过会员查询报班详情
     *
     * @param memberId
     * @return
     */
    List<Map<String, Object>> getAttendClassLessonsDetailList(String memberId, Integer type);


    /**
     * 添加报班信息
     *
     * @param entity
     * @param targetDataId
     * @param memberPackageId
     * @return
     */
    boolean saveEntity(TssMemberAttendClassRecord entity, String targetDataId, String memberPackageId,boolean isUpdateMemberPackager) throws Exception;


    /**
     *把未上课的课节改为已转班
     *
     * @param memberId
     * @param memberPackageId
     * @return
     */
    Integer updateNoClassLessionChangealreadyClass(Integer status,String memberId, String memberPackageId,String targetDataId);

    /**
     * 根据课节id会员id查询报班记录
     * @param memberId
     * @param id
     * @return
     */
    List<TssMemberAttendClassRecord> findAttendClassRecordByLessonsIdMemberId(String memberId, String id) throws Exception;

    /**
     * 根据会员课时包id和班级id查询会员报班情况
     * @param memberPackageId
     * @param classId
     * @return
     */
    List<Map<String,Object>> findAttendClassByClassIdAndMemberPackageId(String memberPackageId,String classId);
    /**
     * 根据课节id查询会员可以报班信息
     * @param classId
     * @return
     */
    List<Map<String,Object>> findCouldClassLessonInfoByClassIdAndMemberPackageId(String lessonIds,String classId);
    /**
     * 根据课节id查询会员可以报班课节信息
     * @param classId
     * @return
     */
    List<Map<String,Object>> findCouldClassLessonInfoByClassIdAndMemberPackageId(String classId);

}
